import { development } from './development'
import { production } from './production'
import configEvn from './env'

const DEV = 'dev'

configEvn(DEV)
console.log('当前环境是:  ', process.env.__DEV__)
console.log('当前环境是:  ', process.env.SECRET)

const config = {
  dev: development,
  prod: production,
  development,
  production
}

const env = process.env.NODE_ENV?.toLowerCase() || DEV
console.log('当前环境是:  ', process.env.NODE_ENV?.toLowerCase())

export const getEnv = () => config[env] ?? config[DEV]
